Skip to content

Conversation

@sebws
Copy link
Contributor

@sebws sebws commented Dec 5, 2025

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

not sure if it would be preferred to be have this as an option at the individual level, e.g., override type of argArray so a full MonitorConfig could be passed into each .schedule().

however, it's also nice to have a default across all

@sebws sebws changed the title add isolateTrace option to node-cron instrument feat(node-core): add isolateTrace option to node-cron instrument Dec 5, 2025
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sebws thanks for opening this PR and apologies for the late review!

This sounds reasonable to me in general but I would like us to also include an integration test. Primarily because this helps us understand the use case for isolateTrace in our automatic cron instrumentation. Would you mind adding a test? Ideally, one that failed before this change and passes with the change. We already have node-cron integration tests in our node-integration-tests and node-core-integration-tests packages. These should give you a good blueprint.

@sebws
Copy link
Contributor Author

sebws commented Dec 16, 2025

@Lms24 I added a test in node-core-integration-tests. I'm not sure if you were saying there should be tests in both? it seems like they're roughly duplicates. Happy to add if necessary

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test! If you don't mind, yes, please also add it to node-integration-tests.

not sure if it would be preferred to be have this as an option at the individual level, e.g., override type of argArray so a full MonitorConfig could be passed into each .schedule().

I think the current approach is good enough for the time being. We can revisit if we need it in the args directly.

@sebws
Copy link
Contributor Author

sebws commented Dec 17, 2025

these tests fail if isolateTrace is set to false. just duplicated the previous test I had done

@Lms24 Lms24 force-pushed the node-cron-trace-isolation branch from 8ef5f09 to 77dc9a3 Compare December 18, 2025 20:18
@Lms24
Copy link
Member

Lms24 commented Dec 18, 2025

FYI, I had to rebase your branch because there was a failing e2e test which had nothing to do with your changes. The fix was already merged to develop so all it should take is a rebase. I'll merge the PR afterwards.

@Lms24 Lms24 enabled auto-merge (squash) December 18, 2025 20:20
@Lms24 Lms24 changed the title feat(node-core): add isolateTrace option to node-cron instrument feat(node-core): Add isolateTrace option to node-cron instrumentation Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants